#ifndef _YEP_ENGINE_VETO_ENABLED_EVENT_HPP
#define _YEP_ENGINE_VETO_ENABLED_EVENT_HPP

#include "../common.hpp"
#include "event.hpp"

namespace yep
{
class Game;
class Scene2d;
/**
 * @brief Represents a System (SDL) event.
 **/
class SystemEvent: public Event
{
public:
    /**
     * @brief Constructor
     **/
    SystemEvent( Game &game, Scene2d &scene ):
        Event( game, scene ) {
        vetoed = false;
    }

    /**
     * @brief Destructor
     **/
    virtual ~SystemEvent() {}

    /**
     * @brief Returns the hasVetor
     **/
    bool hasVeto( void ) const
    {
        return vetoed;
    }

    /**
     * @brief Veto this event.
     *
     * The veto forbids the propagation to another events.
     **/
    void veto()
    {
        vetoed = true;
    }

    /**
     * Converts the event to a SDL_Event.
     * @return a SDL_Event.
     */
    virtual SDL_Event getEvent() const = 0 ;
private:
    bool vetoed;
};

}

#endif // _YEP_ENGINE_VETO_ENABLED_EVENT_HPP

